package Servlets;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.mortbay.util.ajax.Continuation;
import org.mortbay.util.ajax.ContinuationSupport;
/**
 * Servlet :: Connection
 * @author Guy & Liel
 *
 */
public class ConnectionServlet extends HttpServlet 
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	Continuation cc=null;
	public void service(HttpServletRequest request,HttpServletResponse response) throws IOException
	{
		if(true)
		{
			cc=ContinuationSupport.getContinuation(request,null);
			response.setContentType("text/html");
			while(true)
			{
				cc.suspend(0);
				
			}
		}
	/*	if(true)
		{
			cc.resume();
		}*/
		
	}
}
